package org.jeecg.modules.demo.com.kunpeng.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.com.kunpeng.service.ICollectionRecordService;
import org.jeecg.modules.demo.com.kunpeng.vo.CollectionRecordQueryListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags="OA项目回款记录表")
@RestController
@RequestMapping("/com.kunpeng/collectionRecord")
@Slf4j
public class CollectionRecordController {

    @Autowired
    private ICollectionRecordService collectionRecordService;

    /**
     * 根据项目id获取项目回款记录
     * @param oid
     * @return
     */
    @ApiOperation(value = "OA项目回款记录表-根据项目id获取项目回款记录",notes = "OA项目回款记录表-根据项目id获取项目回款记录")
    @GetMapping(value = "/collectionRecordListByOid")
    public Result<List<CollectionRecordQueryListVO>> collectionRecordListByOid(Integer oid){
        List<CollectionRecordQueryListVO> collectionRecordQueryListVOList = collectionRecordService.collectionRecordListByOid(oid);
        return Result.ok(collectionRecordQueryListVOList);
    }
}
